package org.shoukaiseki.aqoeous.config.dbconfig;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * org.shoukaiseki.aqoeous.config.dbconfig.DataBaseConfigConstants
 * <br>
 *
 * @author 蒋カイセキ    Japan-Tokyo  19-2-11 下午2:28<br>
 * ブログ http://www.shoukaiseki.top/<br>
 * E-メール jiang28555@Gmail.com<br>
 **/
public class DataBaseConfigConstants {

    static final Logger logger= LoggerFactory.getLogger("org.shoukaiseki.database");

    public static final String MAPPER_LOCATION = "${sks.multiple.mapperLocations:classpath*:mybatis/**/*Mapper.xml}";

    public static final String PACKET_PREFIX = "org.shoukaiseki";

    /**
     * 数据源session管理器 bean后缀
     */
    public static final String SQLSESSIONFACTORY_SUFFIX="SqlSessionFactory";
    /**
     * 数据源bean后缀
     */
    public static final String DATASOURCE_SUFFIX="DataSource";

    /**
     * 数据源事务管理器 bean后缀
     */
    public static final String TRANSACTIONMANAGER_SUFFIX="TransactionManager";

    public static final String DB1 ="db1";

    public static final String DB2 ="db2";

    public static final String VIRTUALDB ="virtualdb";

    public static final String DB1_SQLSESSION_FACTORY = DB1+SQLSESSIONFACTORY_SUFFIX;

    public static final String DB1_DATASOURCE = DB1+DATASOURCE_SUFFIX;

    public static final String DB1_TRANSACTIONMANAGER= DB1+TRANSACTIONMANAGER_SUFFIX;

    public static final String DB2_SQLSESSION_FACTORY = DB2+SQLSESSIONFACTORY_SUFFIX;

    public static final String DB2_DATASOURCE = DB2+DATASOURCE_SUFFIX;

    public static final String DB2_TRANSACTIONMANAGER= DB2+TRANSACTIONMANAGER_SUFFIX;

    public static final String VIRTUALDB_DATASOURCE =  VIRTUALDB+DATASOURCE_SUFFIX;
    public static final String VIRTUALDB_SQLSESSION_FACTORY = VIRTUALDB+SQLSESSIONFACTORY_SUFFIX;
    public static final String VIRTUALDB_TRANSACTIONMANAGER= VIRTUALDB+TRANSACTIONMANAGER_SUFFIX;

    /**
     * 包过滤方式选择数据源时的检索路径
     */
    public static final String DB1_PACKET_SELECTOR_BASE_PACKAGES_ONE="org.shoukaiseki.**.db1.**.mapper.**";

    /**
     * 包过滤方式选择数据源时的检索路径
     */
    public static final String DB1_PACKET_SELECTOR_BASE_PACKAGES_TWO="org.shoukaiseki.**.mapper.**.db1.**";

    /**
     * 包过滤方式选择数据源时的检索路径
     */
    public static final String DB2_PACKET_SELECTOR_BASE_PACKAGES_ONE="org.shoukaiseki.**.db2.**.mapper.**";

    /**
     * 包过滤方式选择数据源时的检索路径
     */
    public static final String DB2_PACKET_SELECTOR_BASE_PACKAGES_TWO="org.shoukaiseki.**.mapper.**.db2.**";
}
